home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG Revelations
/
BMUG Revelations.toast
/
Programming
/
Programming Languages
/
Yerk 3.64
/
Supplement
/
Unsupported
/
Optionals
/
needAdisk
< prev
next >
Wrap
Text File
|
1986-10-06
|
767b
|
40 lines
\ If you distribute your application on more than one disk and the program
\ needs a volume which is not online, call needAdisk to decide the best choice
\ disk to eject to allow for the needed volume.
\ 9/31/86 cdn Version 1
\ ( -- addr )
: defVCB $ 352 -base @ -base ;
0 variable DrvrRec 46 allot
\ ( drv# -- fCode )
: DriveStatus
DrvrRec 50 erase
8 DrvrRec 26 + w!
-5 DrvrRec 24 + w!
DrvrRec 22 + w!
DrvrRec fcall PBStatus
;
\ ( drv# -- fCode )
: DiskEject
DrvrRec 50 erase
7 DrvrRec 26 + w!
-5 DrvrRec 24 + w!
DrvrRec 22 + w!
DrvrRec fcall PBControl
;
\ Eject best choice disk to allow for new disk
: needAdisk
defVCB 72 + w@ 1 <>
IF 1 DiskEject drop
ELSE
2 DriveStatus drop
DrvrRec 32 + c@ 1 =
IF 2 ELSE 1 THEN
DiskEject drop
THEN
;